<template>
  <div>
    <div class="overView">
      <div class="top">
        <span>{{ title }}</span>
      </div>
      <!-- 概览页面 -->
      <div class="bottom">
        <div class="left">
          <ul>
            <li v-for="item in this.workList1" :key="item.id">
              <span class="yhIcon">
                <img src="../assets/imgs/yh.png" width="20px" height="20px" />
              </span>
              <span @click="showDetail(item.id)" style="margin-left: 22px">
                {{ item.title }}
              </span>
              <i>{{ item.date }}</i>
            </li>
          </ul>
        </div>
        <div class="right">
          <ul>
            <li v-for="item in this.workList2" :key="item.id">
              <span class="yhIcon">
                <img src="../assets/imgs/yh.png" width="20px" height="20px" />
              </span>
              <span @click="showDetail(item.id)" style="margin-left: 22px">
                {{ item.title }}
              </span>
              <i>{{ item.date }}</i>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["title", "workList1", "workList2"],
  data() {
    return {
      isDetail: false,
    };
  },
  methods: {
    showDetail(id) {
      console.log("展示详细信息");
      this.$router.push({
        name: "Details",
        params: {
          id,
        },
      });
    },
  },
};
</script>

<style lang="less" scoped>
* {
  box-sizing: border-box;
}

.overView {
  user-select: none;
  margin: auto;
  width: 1200px;
  .top {
    width: 1200px;
    height: 58px;
    margin-top: 20px;
    background-color: pink;
    span {
      display: inline-block;
      font-size: 22px;
      font-weight: 400;
      color: #fff;
      line-height: 58px;
    }
  }
  .bottom {
    display: flex;
    flex-wrap: wrap;
    width: 1200px;
    height: 423px;
    padding: 15px 0;
    margin: 20px 0;
    border: 8px solid #ffeded;
    .left,
    .right {
      padding-right: 20px;
      vertical-align: middle;
      ul {
        width: 540px;
        height: 40px;
        li {
          display: flex;
          justify-content: space-between;
          height: 40px;
          line-height: 40px;
          .yhIcon {
            width: 20px;
            position: absolute;
            margin-top: 4px;
            margin-right: 5px;
          }
          span {
            cursor: pointer;
            color: rgb(255, 170, 186);
          }
          span:hover {
            cursor: pointer;
            color: #f14461;
          }

          i {
            color: black;
          }
        }
      }
    }
  }
}
</style>
